package com.euq.controller;

import com.euq.entity.Notice;
import com.euq.service.NoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/notice")
public class NoticeController {
    @Autowired
    private NoticeService noticeService;
    @GetMapping("/list")
    public List<Notice> listAll() {
        return noticeService.listAll();
    }
    @PostMapping("/select")
    public Notice select(String title) {
        return noticeService.findByTitle(title);
    }
}
